Alexv Posted October 10, 2021 Posted October 10, 2021 (edited) Hi everyone, I just joined this community recently and I want to say a big thankyou to y'all for sharing your knowledge and providing help to others. I greatly appreciate it and I have used a dozen lisps posted on this forum. I'm using Civil 3D and here's my question: Is it possible to extend or trim 2 different polylines to meet at the intersection that are on different elevations? For example, Line 'A' has an elevation of 50, and Line 'B' has an elevation of 80. And I want both lines to meet at the intersection point (from top Plan view) while maintaining their elevation. So in 3D/model view, Line A would be lower than Line B. So far, I have been using the Extend command to extend Line A to Line B, and then repeating the same procedure for Line B to Line A. This is a repetitive task that I do for hundreds of lines, I hope there's a solution where I can click on Line A and then click on Line B and both lines will automatically extend (or trim) to meet at the intersection (as observed from the top Plan View). The Fillet command doesn't work for non-coplanar lines (lines with different elevations). Thankyou for your time. Edited October 10, 2021 by Alexv Quote
eldon Posted October 10, 2021 Posted October 10, 2021 If you set the system variable EDGEMODE to 1, then you should be able to click on the two lines to extend them. When starting EXTEND, do not select boundary edges - just press enter, then click on line A then line B and they should extend to the intersection point. 1 Quote
tombu Posted October 10, 2021 Posted October 10, 2021 To Extend Objects in 3D Wireframe Models: https://help.autodesk.com/view/ACD/2022/ENU/?guid=GUID-5982214C-6656-4BD8-858A-8A4B4E9BA91C To Trim Objects in 3D Wireframe Models: https://help.autodesk.com/view/ACD/2022/ENU/?guid=GUID-F547B9B9-4582-4D33-9E1A-21ED9B8ED515 1 Quote
Alexv Posted October 11, 2021 Author Posted October 11, 2021 @eldon This is exactly what I needed. I have been using the Extend tool and I didn't know about this trick. Thanks heaps. I greatly Appreciate it. @tombu Thanks Tom, that's very helpful, I didn't know about this stuff until now. I have one more question that is unrelated to Extending lines and I'm not sure if I should start a new thread for it. Please advise if I should create a different thread for the following question. I'm using Cogo points in Civil 3D that allows you to input a description for each Cogo point. So, Is it possible to connect the Cogo points together via Line or polyline based on their description? For example, all the points with the same point description ' Foot Path' joins together automatically? Please see attached screenshot. Civil 3D has a Surveying Database system that requires you to create a new survey database, import the Cogo points into the database to convert them to Survey points and then it'll string the points (with the same description) together. I find that method hardly inflexible and difficult to work with because the survey figure (the survey version of polyline) isn't easy to work with compared to the line and polyline. Any modification to the survey points or figures require you to update the survey database to reflect the change. Thanks again and have a good day Quote
tombu Posted October 11, 2021 Posted October 11, 2021 1 hour ago, Alexv said: I have one more question that is unrelated to Extending lines and I'm not sure if I should start a new thread for it. Please advise if I should create a different thread for the following question. I'm using Cogo points in Civil 3D that allows you to input a description for each Cogo point. So, Is it possible to connect the Cogo points together via Line or polyline based on their description? For example, all the points with the same point description ' Foot Path' joins together automatically? Please see attached screenshot. Civil 3D has a Surveying Database system that requires you to create a new survey database, import the Cogo points into the database to convert them to Survey points and then it'll string the points (with the same description) together. I find that method hardly inflexible and difficult to work with because the survey figure (the survey version of polyline) isn't easy to work with compared to the line and polyline. Any modification to the survey points or figures require you to update the survey database to reflect the change. Thanks again and have a good day Reasons it's best to have the Survey crew create all the linework in the field: 1. They were actually there! Nothing worse than guessing what was actually out there in the field. We shouldn't have to go out to the sites to figure out what we're drawing. 2. Feature lines from field codes draw curves smoothly, accurately and are able to carry elevations as breaklines. Creating a surface that reflects curbs at an intersection would be impossible without them. Our crew isn't perfect so I'll show them the drawing after reducing it to see if it needs to be modified. They put in the wrong codes requiring them to be modified and re-reduced but the results are what matters. Even if I had to add all the linework coding I'd still do it rather than drawing lines. 1 Quote
hosneyalaa Posted October 11, 2021 Posted October 11, 2021 6 hours ago, Alexv said: @eldon This is exactly what I needed. I have been using the Extend tool and I didn't know about this trick. Thanks heaps. I greatly Appreciate it. @tombu Thanks Tom, that's very helpful, I didn't know about this stuff until now. I have one more question that is unrelated to Extending lines and I'm not sure if I should start a new thread for it. Please advise if I should create a different thread for the following question. I'm using Cogo points in Civil 3D that allows you to input a description for each Cogo point. So, Is it possible to connect the Cogo points together via Line or polyline based on their description? For example, all the points with the same point description ' Foot Path' joins together automatically? Please see attached screenshot. Civil 3D has a Surveying Database system that requires you to create a new survey database, import the Cogo points into the database to convert them to Survey points and then it'll string the points (with the same description) together. I find that method hardly inflexible and difficult to work with because the survey figure (the survey version of polyline) isn't easy to work with compared to the line and polyline. Any modification to the survey points or figures require you to update the survey database to reflect the change. Thanks again and have a good day ARE YOU USING CIVIL 3d Or auto cad And Attached example drawing 1 Quote
BIGAL Posted October 11, 2021 Posted October 11, 2021 We have been using CIV3D for years and always auto strung the strings, we have around 270 codes in the "Description key sets". Some of these projects have in excess of 10,000 points. You just need a DWT that has the keys set up in it, there are basically 2 a numeric or a Alpha key set with a few that are both TR6 Tree 6m dia. Do you have access to a DWT that is set up ? If not we need to know what your codes look like. Ask who you bought the Civ3d from they should have some. Ok now for the real big news, in CIV3D you can export the Description keys but you can not import, so I wrote one it reads a excel csv with all the details and makes description keys. 1 1 Quote
Alexv Posted October 12, 2021 Author Posted October 12, 2021 @tombu Thanks for the reply. Just to clarify, I'm not working with survey field data. I have to manually put in each coordinated Cogo point (from old plans) and then join them together. Hence I'm asking if there's an easier way to join Cogo points together based on their assigned point description. @BIGAL Thanks for the reply. Yes, I have set up a point description system for other things that automatically change point symbol based on its description. Though the point description function doesn't join points together into a line or polyline. @hosneyalaa Thanks for the reply. I'm using Civil 3D to create the Cogo points and assigning each Cogo point with a description. So I wonder if it's possible to join the Cogo points together (points with the same description) without using the survey database's 'line work figure', which as I have pointed out - isn't intuitive and not easy to work with. Currently, I have to use the polyline tool to snap to each Cogo point to form a line. That Or I'll have to create a new survey database to connect the points together. By importing the Cogo points into the survey database to convert them to survey points, which would create a survey duplicate of all the points. And if were to modify the Cogo points, I would need to re-import the Cogo points back into the survey database again to update the figure line work. @hosneyalaa Here's the example Civil 3d point file. Please see attached file. Thanks! Thanks again everyone for your replies. Have a good day. example.dwg Quote
hosneyalaa Posted October 12, 2021 Posted October 12, 2021 hi try this (defun c:testjionRawData (/ % C3D C3DDOC ENAME1 PNTNUMS POINTS RAWDATA) (vl-load-com) (defun getC3D () (vl-load-com) (setq C3D (strcat "HKEY_LOCAL_MACHINE\\" (if vlax-user-product-key (vlax-user-product-key) (vlax-product-key) ) ) C3D (vl-registry-read C3D "Release") C3D (substr C3D 1 (vl-string-search "." C3D (+ (vl-string-search "." C3D) 1) ) ) C3D (vla-getinterfaceobject (vlax-get-acad-object) (strcat "AeccXUiLand.AeccApplication." C3D) ) ) (setq C3Ddoc (vla-get-activedocument C3D)) ) (defun comp (opr1 item1 opr2 item2) (if (equal (item2 a) (item2 b) 0.1) (opr1 (item1 a) (item1 b)) (opr2 (item2 a) (item2 b)) ) ) (getC3D) (setq points (vlax-get C3Ddoc 'points)) (setq eName1 nil) (while (= eName1 nil) (initget 1) (setq eName1 (car (entsel "\nSelect AECC_COGO_POINT rawdescription: "))) (if (= (cdr (assoc 0 (entget eName1))) "AECC_COGO_POINT") (setq rawData (vlax-get (vlax-ename->vla-object eName1) 'rawdescription)) (setq eName1 nil) ) ) (if rawData (progn (setq points (vlax-get C3Ddoc 'points)) (setq pntnums nil) (vlax-for pntobj points (if (= (vlax-get pntobj 'rawdescription) rawData) (setq pntnums (cons (list (vlax-get pntobj 'easting) (vlax-get pntobj 'northing)) pntnums)) ) ) ;sort list (setq pntnums (mapcar '(lambda (%) (nth % pntnums)) (vl-sort-i pntnums '(lambda (a b) (comp > caDr < car)) ) ) ) ;;; (PRINC xy) (entmake (list '(0 . "POLYLINE") '(100 . "AcDbEntity") '(100 . "AcDb3dPolyline") '(66 . 1) '(62 . 1) '(10 0.0 0.0 0.0) '(70 . 8) '(210 0.0 0.0 1.0) ) ) (foreach pt pntnums (entmake (list '(0 . "VERTEX") '(100 . "AcDbEntity") '(100 . "AcDbVertex") '(100 . "AcDb3dPolylineVertex") (cons 10 pt) '(70 . 32) ) ) ) (entmake (list '(0 . "SEQEND") '(100 . "AcDbEntity") ) ) ) (prompt "\n** Nothing selected ** ")) (princ) ) 1 Quote
Alexv Posted October 12, 2021 Author Posted October 12, 2021 @hosneyalaa Thank you so much. The script works like a charm and very intuitive. Though after creating the lines, I checked in the object viewer and the new lines have 0 elevation. Is it possible for the line to inherit the Cogo point's elevation that it connects to? Currently, the lines are flat and don't have height information from the Cogo points. Have a good day and I greatly appreciate your help. You're very talented. Quote
hosneyalaa Posted October 12, 2021 Posted October 12, 2021 try (defun c:testjionRawData (/ % C3D C3DDOC ENAME1 PNTNUMS POINTS RAWDATA) (vl-load-com) (defun getC3D () (vl-load-com) (setq C3D (strcat "HKEY_LOCAL_MACHINE\\" (if vlax-user-product-key (vlax-user-product-key) (vlax-product-key) ) ) C3D (vl-registry-read C3D "Release") C3D (substr C3D 1 (vl-string-search "." C3D (+ (vl-string-search "." C3D) 1) ) ) C3D (vla-getinterfaceobject (vlax-get-acad-object) (strcat "AeccXUiLand.AeccApplication." C3D) ) ) (setq C3Ddoc (vla-get-activedocument C3D)) ) (defun comp (opr1 item1 opr2 item2) (if (equal (item2 a) (item2 b) 0.1) (opr1 (item1 a) (item1 b)) (opr2 (item2 a) (item2 b)) ) ) (getC3D) (setq points (vlax-get C3Ddoc 'points)) (setq eName1 nil) (while (= eName1 nil) (initget 1) (setq eName1 (car (entsel "\nSelect AECC_COGO_POINT rawdescription: "))) (if (= (cdr (assoc 0 (entget eName1))) "AECC_COGO_POINT") (setq rawData (vlax-get (vlax-ename->vla-object eName1) 'rawdescription)) (setq eName1 nil) ) ) (if rawData (progn (setq points (vlax-get C3Ddoc 'points)) (setq pntnums nil) (vlax-for pntobj points (if (= (vlax-get pntobj 'rawdescription) rawData) (setq pntnums (cons (list (vlax-get pntobj 'easting) (vlax-get pntobj 'northing)(vlax-get pntobj 'elevation)) pntnums)) ) ) ;sort list (setq pntnums (mapcar '(lambda (%) (nth % pntnums)) (vl-sort-i pntnums '(lambda (a b) (comp > caDr < car)) ) ) ) ;;; (PRINC xy) (entmake (list '(0 . "POLYLINE") '(100 . "AcDbEntity") '(100 . "AcDb3dPolyline") '(66 . 1) '(62 . 1) '(10 0.0 0.0 0.0) '(70 . 8) '(210 0.0 0.0 1.0) ) ) (foreach pt pntnums (entmake (list '(0 . "VERTEX") '(100 . "AcDbEntity") '(100 . "AcDbVertex") '(100 . "AcDb3dPolylineVertex") (cons 10 pt) '(70 . 32) ) ) ) (entmake (list '(0 . "SEQEND") '(100 . "AcDbEntity") ) ) ) (prompt "\n** Nothing selected ** ")) (princ) ) 1 Quote
hosneyalaa Posted October 12, 2021 Posted October 12, 2021 thank you If you have other questions, you should put your question in the Civil 3D Customization Forum from here https://forums.autodesk.com/t5/civil-3d-customization/bd-p/190 1 Quote
Alexv Posted October 12, 2021 Author Posted October 12, 2021 @hosneyalaa Thank you so much! That is perfect! It's exactly what I'm looking for. I'm very grateful for your help. Yes, I will post any new question in the Civil 3D section in the future. Thanks again to everyone for your time and your replies. All the best to all of you. Have a good day. Quote
BIGAL Posted October 13, 2021 Posted October 13, 2021 (edited) You quoted I have to manually put in each coordinated Cogo point (from old plans) So why not make a csv file with P,E,N,Z,D if your picking points from a existing plan what do they have, are they on a layer and with z's. By picking you can look at stringing the code using a while pick say edge of bitumen in sequence, so P,E,N,Z,001EB gets created the other side would be P,E,N,Z,002EB so the 2 sides do not join. Can you post a old plan dwg. May be able to do something with it. Edited October 13, 2021 by BIGAL 2 Quote
Alexv Posted October 13, 2021 Author Posted October 13, 2021 5 hours ago, BIGAL said: You quoted I have to manually put in each coordinated Cogo point (from old plans) So why not make a csv file with P,E,N,Z,D if your picking points from a existing plan what do they have, are they on a layer and with z's. By picking you can look at stringing the code using a while pick say edge of bitumen in sequence, so P,E,N,Z,001EB gets created the other side would be P,E,N,Z,002EB so the 2 sides do not join. Can you post a old plan dwg. May be able to do something with it. The old plans are on scanned paper with a long list of coordinates accompanied with diagram sketches. No csv point file. Thanks and have a goo day. Quote
BIGAL Posted October 14, 2021 Posted October 14, 2021 Our surveyors would go out and resurvey faster than say converting the paper to cad. How many hours are you spending ? Use a spreadsheet or even notepad for entry of X & Y then can do a column that looks like this, -la M EB C 1 EB PLine X,Y X,Y X,Y -la M CL c 2 CL PL X,Y X,Y X,Y <-- note the blank lines this is the equivalent to press Enter Just copy the column to Autocad command line and all your lines will appear, this method has been known about for years. 1 Quote
Alexv Posted October 14, 2021 Author Posted October 14, 2021 Thanks for the advice BIGAL, I didn't know that you can do that with the Pline and PL commands. Much appreciated! Have a good day. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.